goto abort_transaction;
}
+ err = xenbus_printf(xbt, dev->nodename, "feature-rx-notify", "%d", 1);
+ if (err) {
+ message = "writing feature-rx-notify";
+ goto abort_transaction;
+ }
+
err = xenbus_transaction_end(xbt, 0);
if (err) {
if (err == -EAGAIN)
unsigned short id;
struct netfront_info *np = netdev_priv(dev);
struct sk_buff *skb;
- int i, batch_target;
+ int i, batch_target, notify;
RING_IDX req_prod = np->rx.req_prod_pvt;
struct xen_memory_reservation reservation;
grant_ref_t ref;
/* Above is a suitable barrier to ensure backend will see requests. */
np->rx.req_prod_pvt = req_prod + i;
push:
- RING_PUSH_REQUESTS(&np->rx);
+ RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&np->rx, notify);
+ if (notify)
+ notify_remote_via_irq(np->irq);
}
static void xennet_make_frags(struct sk_buff *skb, struct net_device *dev,
#include "../grant_table.h"
/*
- * Note that there is *never* any need to notify the backend when
- * enqueuing receive requests (struct netif_rx_request). Notifications
- * after enqueuing any other type of message should be conditional on
+ * Notifications after enqueuing any type of message should be conditional on
* the appropriate req_event or rsp_event field in the shared ring.
+ * If the client sends notification for rx requests then it should specify
+ * feature 'feature-rx-notify' via xenbus. Otherwise the backend will assume
+ * that it cannot safely queue packets (as it may not be kicked to send them).
*/
/*